package org.jeecg.modules.cosmetic.utils;

/**
 * @author scx
 * @date 2022/6/30 4:24 下午
 */
public class CurrentUserUtil {

    private CurrentUserUtil() {
    }

    private static final ThreadLocal<AuthInfo> CURRENT_USER = new ThreadLocal<AuthInfo>();

    public static void set(AuthInfo authInfo) {
        CURRENT_USER.set(authInfo);
    }


    public static AuthInfo authInfo() {
        return CURRENT_USER.get();
    }

    public static void remove() {
        CURRENT_USER.remove();
    }
}
